<?php

class feedbackWidgetComponents extends myComponents
{
  public function executeRender()
  {
    $this->banners = $this->getBanners('feedback');
  }

  protected function getBanners($type)
  {
    return Doctrine_Query::create()
          ->from('Banner b')
          ->innerJoin('b.BannerGroup bg WITH bg.type = ?', $type)
          ->innerJoin('bg.StructureBannerGroups sbg')
          ->innerJoin('sbg.Structure s WITH s.lang = ?', $this->getRoute()->getObject()->getLang())
          ->setHydrationMode(Doctrine::HYDRATE_ARRAY)
          ->execute();

  }  
}
